package io.renren.dao;

import io.renren.common.dao.BaseDao;
import io.renren.entity.AutoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 车辆信息主表
 *
 * @author Sen 524227263@qq.com
 * @since 1.0.0 2024-05-22
 */
@Mapper
public interface AutoDao extends BaseDao<AutoEntity> {

    List<String> exSql(@Param("autoOID") String autoOID);

    @Override
    int updateById(AutoEntity entity);

    List<String> getStatusListByReservationMOID(@Param("reservationmoid") String reservationmoid);

    @Select("SELECT CodeID,CodeName FROM CodeValue WHERE CodeTableID  = 'ReservationContent' and CodeID =#{reservationcontent}")
    Map<String, Object> getReservationContent(@Param("reservationcontent") String reservationcontent);

    @Select("SELECT OrgName FROM UCML_Organize WHERE UCML_OrganizeOID=#{reservationFk}")
    Map<String, Object> getOrganize(@Param("reservationFk") String reservationFk);
}